package com.ynny.demo09;

public class MyStringTest {
    public static void main(String[] args) {
            String s1 = "hello java";
            String s2 = "hello java";
            if (s1.equals(s2)) {
            String sc = s1.replace(" ", "");
            String sd = sc.replace("java", "word");
            System.out.println("修改后的字符串: " + sd);
        }
            else {
            System.out.println("两个字符串不相等");
        }
    }
}

